import request from '@/utils/request'

export function findOrders() {
  return request({
    url: '/produce/pro-order/findOrders',
    method: 'get'
  })
}

export function findProcesses() {
  return request({
    url: '/produce/process/findProcesses',
    method: 'get'
  })
}

export function findDayOrders(name) {
  return request({
    url: '/produce/process/findDayOrders',
    method: 'get',
    params: {
      name: name
    }
  })
}

export function findCrafts() {
  return request({
    url: '/produce/craft/findCrafts',
    method: 'get',
  })
}

export function add(dept) {
  return request({
    url: '/depts',
    method: 'post',
    data: dept
  })
}

export function update(dept) {
  return request({
    url: '/depts',
    method: 'put',
    data: dept
  })
}

export function deleteById(id) {
  return request({
    url: '/depts/' + id,
    method: 'delete'
  })
}

export function selectById(id) {
  return request({
    url: '/depts/' + id,
    method: 'get'
  })
}
